package com.lajiaomian.springbootruijiwaimai.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lajiaomian.springbootruijiwaimai.pojo.ShoppingCart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author lajiaomian
 * @create 2022-08-17-22:20
 */
@Mapper
public interface ShoppingCartMapper extends BaseMapper<ShoppingCart> {
    @Select("SELECT * FROM shopping_cart WHERE user_id = #{userId} AND dish_id=#{dishId} or setmeal_id=#{setmealId}")
    ShoppingCart getOneByUserIdAndDishIdAndSetmealId(Long userId,Long dishId,Long setmealId);
}
